package router

import (
	"github.com/gin-gonic/gin"
	"tem/middlewares"
)

var R = gin.Default()

func InitRouter() {
	R.Static("/static", "./static")
	R.Use(middlewares.Logger(), middlewares.JwtParse())
	//middlewares.CORS()
	// 前端项目静态资源
	//router.StaticFile("/", "./static/dist/index.html")
	//router.Static("/assets", "./static/dist/assets")
	//router.StaticFile("/favicon.ico", "./static/dist/favicon.ico")
	//// 其他静态资源
	//router.Static("/public", "./static")
	//router.Static("/storage", "./storage/app/public")

	InitUserRouter()
	InitSaveFileRouter()
	InitInstantRouter()
	InitLikeRouter()
	InitCommentRouter()
	R.Run(":9001")
}
